<?php
$id = $epg['id'];
$data = json_decode(file_get_contents('https://programme.tvb.com/api/schedule?input_date='.date('Ymd').'&network_code='.$id));
for($i = 0; $i <= count($data->data->list[0]->schedules) - 1; $i++) {
    echo '<li><span>'.date('H:i',$data->data->list[0]->schedules[$i]->event_time).'</span>&nbsp&nbsp&nbsp'.$data->data->list[0]->schedules[$i]->programme_title.'</li>';
};